home *** CD-ROM | disk | FTP | other *** search
- function renderMovie(file, movie_name)
- {
- calculateCurrentVideo(file);
- if(file.indexOf("http") != -1 or file.indexOf("rtmp") != -1)
- {
- movieURL_active = file;
- }
- else
- {
- movieURL_active = fsp_path + moviepath_info + file;
- }
- video_mode = true;
- toolbar_mode = false;
- content_pos_mc.bottom_mc._visible = false;
- hideBacktoVideoButton();
- content_pos_mc.video_mc.setLocalPos();
- content_pos_mc.video_mc._visible = true;
- if(full_video_mode_display == "true")
- {
- content_pos_mc.tab_navigation_mc._visible = false;
- }
- i = 0;
- while(i < used_tab_arr.length)
- {
- content_pos_mc.tab_navigation_mc["tab_item_mc" + i].tab_navigation_item_active_mc._visible = false;
- content_pos_mc.tab_navigation_mc["tab_item_mc" + i].enabled = true;
- if(used_tab_arr[i][2])
- {
- content_pos_mc.content_mc[used_tab_arr[i][1]].setVisibility(false);
- }
- i++;
- }
- if(file.lastIndexOf("/") > -1)
- {
- current_swf = file.substring(file.lastIndexOf("/") + 1,file.lastIndexOf("."));
- }
- else
- {
- current_swf = file.substring(0,file.lastIndexOf("."));
- }
- content_pos_mc.video_mc.buildOverview();
- content_pos_mc.video_mc.refreshMovieNavigation();
- content_pos_mc.video_mc.buildMovieInfo();
- content_pos_mc.video_mc.resetBookmarks();
- content_pos_mc.video_mc.removeVideoBuffer();
- content_pos_mc.video_mc.removeVideoInit();
- playVideo(movieURL_active);
- setPos();
- }
- function renderNextMovie(file, movie_name)
- {
- if(file.indexOf("http") != -1 or file.indexOf("rtmp") != -1)
- {
- movieURL_active = file;
- }
- else
- {
- movieURL_active = fsp_path + moviepath_info + file;
- }
- if(file.lastIndexOf("/") > -1)
- {
- current_swf = file.substring(file.lastIndexOf("/") + 1,file.lastIndexOf("."));
- }
- else
- {
- current_swf = file.substring(0,file.lastIndexOf("."));
- }
- content_pos_mc.video_mc.bookmark_window_mc.removeMovieClip();
- content_pos_mc.video_mc.cover_btn._visible = false;
- content_pos_mc.video_mc.buildOverview();
- content_pos_mc.video_mc.refreshMovieNavigation();
- content_pos_mc.video_mc.buildMovieInfo();
- content_pos_mc.video_mc.resetBookmarks();
- content_pos_mc.video_mc.removeVideoBuffer();
- content_pos_mc.video_mc.removeVideoInit();
- playVideo(movieURL_active);
- }
- function renderToolbarMovie(file, movie_name)
- {
- calculateCurrentVideo(file);
- if(file.indexOf("http") != -1 or file.indexOf("rtmp") != -1)
- {
- movieURL_active = file;
- }
- else
- {
- movieURL_active = fsp_path + moviepath_info + file;
- }
- video_mode = true;
- toolbar_mode = true;
- content_pos_mc.bottom_mc._visible = false;
- hideBacktoVideoButton();
- content_pos_mc.video_mc.setLocalPos();
- content_pos_mc.video_mc._visible = true;
- if(full_video_mode_display == "true")
- {
- content_pos_mc.tab_navigation_mc._visible = false;
- }
- i = 0;
- while(i < used_tab_arr.length)
- {
- content_pos_mc.tab_navigation_mc["tab_item_mc" + i].tab_navigation_item_active_mc._visible = false;
- content_pos_mc.tab_navigation_mc["tab_item_mc" + i].enabled = true;
- if(used_tab_arr[i][2])
- {
- content_pos_mc.content_mc[used_tab_arr[i][1]].setVisibility(false);
- }
- i++;
- }
- if(file.lastIndexOf("/") > -1)
- {
- current_swf = file.substring(file.lastIndexOf("/") + 1,file.lastIndexOf("."));
- }
- else
- {
- current_swf = file.substring(0,file.lastIndexOf("."));
- }
- content_pos_mc.video_mc.buildOverview();
- content_pos_mc.video_mc.refreshMovieNavigation();
- content_pos_mc.video_mc.buildMovieInfo();
- content_pos_mc.video_mc.removeVideoBuffer();
- content_pos_mc.video_mc.removeVideoInit();
- playVideo(movieURL_active);
- setPos();
- }
- function renderVideoBookmark(_chapter_node, _file, _movie_name, _timecode)
- {
- parseVideo(_chapter_node);
- _root.calculateCurrentVideo(_file);
- if(_file.indexOf("http") != -1 or _file.indexOf("rtmp") != -1)
- {
- movieURL_active = _file;
- }
- else
- {
- movieURL_active = fsp_path + moviepath_info + _file;
- }
- video_mode = true;
- toolbar_mode = false;
- play_all_mode = false;
- content_pos_mc.bottom_mc._visible = false;
- hideBacktoVideoButton();
- content_pos_mc.video_mc.setLocalPos();
- content_pos_mc.video_mc._visible = true;
- if(full_video_mode_display == "true")
- {
- content_pos_mc.tab_navigation_mc._visible = false;
- }
- i = 0;
- while(i < used_tab_arr.length)
- {
- content_pos_mc.tab_navigation_mc["tab_item_mc" + i].tab_navigation_item_active_mc._visible = false;
- content_pos_mc.tab_navigation_mc["tab_item_mc" + i].enabled = true;
- if(used_tab_arr[i][2])
- {
- content_pos_mc.content_mc[used_tab_arr[i][1]].setVisibility(false);
- }
- i++;
- }
- if(file.lastIndexOf("/") > -1)
- {
- current_swf = _file.substring(_file.lastIndexOf("/") + 1,_file.lastIndexOf("."));
- }
- else
- {
- current_swf = _file.substring(0,_file.lastIndexOf("."));
- }
- content_pos_mc.video_mc.buildOverview();
- content_pos_mc.video_mc.refreshMovieNavigation();
- content_pos_mc.video_mc.buildMovieInfo();
- content_pos_mc.video_mc.resetBookmarks();
- content_pos_mc.video_mc.removeVideoBuffer();
- content_pos_mc.video_mc.removeVideoInit();
- content_pos_mc.video_mc.resetVcore();
- clearInterval(load_delay);
- load_delay = setTimeout(content_pos_mc.video_mc.loadVideo,200,movieURL_active,_timecode);
- setPos();
- }
- function renderInlayVideo(file, __smoothing)
- {
- content_pos_mc._visible = false;
- inline_video_mode = true;
- bg_mc._alpha = 35;
- special_pos_mc._x = 0;
- special_pos_mc._y = 0;
- bg_mc.onRelease = function()
- {
- killInlayVideo();
- };
- special_pos_mc.attachMovie("inlay_video_mc","inlay_video_mc",2);
- special_pos_mc.inlay_video_mc.__smoothing = __smoothing;
- if(file.indexOf("http") != -1 or file.indexOf("rtmp") != -1)
- {
- special_pos_mc.inlay_video_mc.current_video_url = file;
- }
- else
- {
- special_pos_mc.inlay_video_mc.current_video_url = fsp_path + folder + file;
- }
- inlay_video_mc_x = Math.round(Stage.width / 2 - (Number(inlay_player_width) + 40) / 2);
- inlay_video_mc_y = Math.round(Stage.height / 2 - (Number(inlay_player_height) + 85) / 2);
- if(inlay_video_mc_x <= 0)
- {
- inlay_video_mc_x = 0;
- }
- if(inlay_video_mc_y <= 0)
- {
- inlay_video_mc_y = 0;
- }
- special_pos_mc.inlay_video_mc._x = inlay_video_mc_x;
- special_pos_mc.inlay_video_mc._y = inlay_video_mc_y;
- }
- function killMovie()
- {
- clearInterval(load_delay);
- clearInterval(content_pos_mc.video_mc.init_vcore_delay);
- content_pos_mc.video_mc._visible = false;
- video_mode = false;
- setPos();
- content_pos_mc.bottom_mc._visible = true;
- content_pos_mc.video_mc.cover_btn._visible = false;
- content_pos_mc.video_mc.removeVideoBuffer();
- content_pos_mc.video_mc.removeVideoInit();
- content_pos_mc.video_mc.bookmark_window_mc.removeMovieClip();
- content_pos_mc.video_mc.resetVcore();
- play_all_mode = false;
- content_pos_mc.tab_navigation_mc._visible = true;
- renderContent(last_visible_content);
- }
- function killInlayVideo()
- {
- content_pos_mc._visible = true;
- bg_mc._alpha = 100;
- inline_video_mode = false;
- delete bg_mc.onRelease;
- special_pos_mc.dark_mc.removeMovieClip();
- special_pos_mc.inlay_video_mc.removeMovieClip();
- }
- function findParentVideoNode(video_index)
- {
- var _loc3_ = video_index.split(".");
- if(_loc3_.length > 0 && isNaN(Number(_loc3_[_loc3_.length - 1])))
- {
- _loc3_.splice(_loc3_.length - 1,1);
- }
- var _loc4_ = _root.cd_content.firstChild;
- if(_loc3_.length > 1)
- {
- var _loc2_ = 0;
- while(_loc2_ < _loc3_.length - 1)
- {
- _loc4_ = _loc4_.childNodes[_loc3_[_loc2_] - 1];
- _loc2_ = _loc2_ + 1;
- }
- }
- var _loc5_ = _loc4_.childNodes[_loc3_[_loc3_.length - 1] - 1];
- return {parent_node:_loc4_,child_node:_loc5_};
- }
- function calculateCurrentVideo(arg)
- {
- i = 0;
- while(i < video_data.length)
- {
- if(video_data[i].attributes.movie == arg)
- {
- current_video = i;
- }
- i++;
- }
- }
- function parseVideo(xmlNode)
- {
- video_data = new Array();
- var _loc1_ = 0;
- while(_loc1_ < xmlNode.childNodes.length)
- {
- if(xmlNode.childNodes[_loc1_].attributes.type == "movie" and xmlNode.childNodes[_loc1_].attributes.cd > 0)
- {
- video_data.push(xmlNode.childNodes[_loc1_]);
- }
- _loc1_ = _loc1_ + 1;
- }
- }
- function parseVideoPlayAll(xmlNode)
- {
- if(xmlNode.hasChildNodes())
- {
- var _loc1_ = 0;
- while(_loc1_ < xmlNode.childNodes.length)
- {
- if(xmlNode.childNodes[_loc1_].attributes.type == "movie")
- {
- if(xmlNode.childNodes[_loc1_].attributes.cd > 0)
- {
- video_data.push(xmlNode.childNodes[_loc1_]);
- }
- }
- parseVideoPlayAll(xmlNode.childNodes[_loc1_]);
- _loc1_ = _loc1_ + 1;
- }
- }
- }
- function playVideo(url)
- {
- content_pos_mc.video_mc.resetVcore();
- clearInterval(load_delay);
- load_delay = setTimeout(content_pos_mc.video_mc.loadVideo,200,url);
- }
- function playAll()
- {
- current_video = 0;
- video_data = new Array();
- parseVideoPlayAll(_root.cd_content);
- play_all_max = video_data.length;
- play_all_mode = true;
- renderMovie(video_data[current_video].attributes.movie,video_data[current_video].attributes.name);
- }
- function playAllChapter(xmlNode)
- {
- current_video = 0;
- parseVideo(xmlNode);
- play_all_max = video_data.length;
- play_all_mode = true;
- renderMovie(video_data[current_video].attributes.movie,video_data[current_video].attributes.name);
- }
- function pauseMovie()
- {
- clearInterval(load_delay);
- content_pos_mc.video_mc._visible = false;
- content_pos_mc.video_mc.removeVideoBuffer();
- content_pos_mc.video_mc.removeVideoInit();
- content_pos_mc.video_mc.flv_player.pause();
- content_pos_mc.video_mc.bookmark_window_mc.removeMovieClip();
- content_pos_mc.video_mc.cover_btn._visible = false;
- video_mode = false;
- setPos();
- content_pos_mc.bottom_mc._visible = true;
- content_pos_mc.tab_navigation_mc.attachMovie("tab_navigation_bg_mc","back_to_video_bg_mc",content_pos_mc.tab_navigation_mc.getNextHighestDepth());
- content_pos_mc.tab_navigation_mc.back_to_video_bg_mc._visible = false;
- content_pos_mc.tab_navigation_mc.back_to_video_bg_mc._height = 25;
- content_pos_mc.tab_navigation_mc.attachMovie("back_to_video_btn_mc","back_to_video_btn_mc",content_pos_mc.tab_navigation_mc.getNextHighestDepth());
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc._visible = false;
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.text_op._x = 20;
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.text_op.autoSize = true;
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.text_op.textColor = parseColor(tabnavigator_text_color);
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.text_op.text = b2v_button_rollover_text.toUpperCase();
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.updown_symbol_mc.symbol.textColor = parseColor(tabnavigator_text_color);
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.btn_bg_mc._width = Math.round(content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.text_op.textWidth + 67);
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.btn_rollover_mc._visible = false;
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.updown_symbol_mc._x = content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.btn_bg_mc._width - 30;
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.updown_symbol_mc._alpha = 50;
- drawBox(content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.btn_rollover_mc,content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.btn_bg_mc._width,23,parseColor(tabnavigator_rollover_color),parseColor(tabnavigator_rollover_color),100,100,"linear");
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc._x = Math.round(content_pos_mc.tab_navigation_mc._x + content_pos_mc.tab_navigation_mc._width);
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc._y = 2;
- content_pos_mc.tab_navigation_mc.back_to_video_bg_mc._width = Math.round(content_pos_mc.tab_navigation_mc.back_to_video_btn_mc._width + 3);
- content_pos_mc.tab_navigation_mc.back_to_video_bg_mc._x = content_pos_mc.tab_navigation_mc.back_to_video_btn_mc._x - 2;
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.onRollOver = function()
- {
- this.btn_rollover_mc._visible = true;
- };
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.onRollOut = function()
- {
- this.btn_rollover_mc._visible = false;
- };
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.onRelease = function()
- {
- continueVideo();
- };
- showBacktoVideoButton();
- }
- function continueVideo()
- {
- content_pos_mc.bottom_mc._visible = false;
- destroyBacktoVideoButton();
- video_mode = true;
- i = 0;
- while(i < used_tab_arr.length)
- {
- content_pos_mc.tab_navigation_mc["tab_item_mc" + i].tab_navigation_item_active_mc._visible = false;
- content_pos_mc.tab_navigation_mc["tab_item_mc" + i].enabled = true;
- if(used_tab_arr[i][2])
- {
- content_pos_mc.content_mc[used_tab_arr[i][1]].setVisibility(false);
- }
- i++;
- }
- content_pos_mc.video_mc.setLocalPos();
- content_pos_mc.video_mc._visible = true;
- content_pos_mc.video_mc.flv_player.play();
- setPos();
- }
- function showBacktoVideoButton()
- {
- clearInterval(back_to_video_destroy_delay);
- b2v_bg_target_pos_y = content_pos_mc.tab_navigation_mc.back_to_video_bg_mc._y;
- b2v_btn_target_pos_y = content_pos_mc.tab_navigation_mc.back_to_video_btn_mc._y;
- content_pos_mc.tab_navigation_mc.back_to_video_bg_mc._y = 30;
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc._y = 30;
- content_pos_mc.tab_navigation_mc.back_to_video_bg_mc._visible = true;
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc._visible = true;
- content_pos_mc.tab_navigation_mc.back_to_video_bg_mc.stopTween();
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.stopTween();
- content_pos_mc.tab_navigation_mc.back_to_video_bg_mc.tween(["_y"],b2v_bg_target_pos_y,0.5,"easeOutQuart",0.3);
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.tween(["_y"],b2v_btn_target_pos_y,0.5,"easeOutQuart",0.4);
- }
- function hideBacktoVideoButton()
- {
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.tween(["_alpha"],0,0.2,"easeOutQuart");
- content_pos_mc.tab_navigation_mc.back_to_video_bg_mc.tween(["_alpha"],0,0.2,"easeOutQuart",0.1);
- clearTimeout(back_to_video_destroy_delay);
- back_to_video_destroy_delay = setTimeout(destroyBacktoVideoButton,350);
- }
- function destroyBacktoVideoButton()
- {
- content_pos_mc.tab_navigation_mc.back_to_video_bg_mc.removeMovieClip();
- content_pos_mc.tab_navigation_mc.back_to_video_btn_mc.removeMovieClip();
- }
-